﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrador/Site.Master" AutoEventWireup="true" CodeBehind="ModificarCasa.aspx.cs" Inherits="Smart_House_System.Administrador.Formulario_web11" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2 id="myH2" style="margin-top:10%;">
        Modificar Casa
    </h2>
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <div class="accordionHeader">Modificar Casa</div>
        <asp:Panel ID="AccordionPane2" runat="server" CssClass="accordionContent">   
        <table style="width: 100%;"  >
            <tr><td>&nbsp;</td></tr>
            <tr >
                <td style="text-align:right; width:45%">
                    &nbsp;
                    Cedula</td>
                <td style="text-align:left; width:55%">
                    <asp:TextBox ID="txtCedula" runat="server" CssClass="myText" MaxLength="8"></asp:TextBox>
                    &nbsp;  
                    <asp:Button ID="btnBuscar" runat="server" Text=""  CssClass="btnBuscarUsu" 
                        onclick="btnBuscar_Click" CausesValidation="False"/>
                    &nbsp;      
                    <asp:RequiredFieldValidator ID="rfvCedula" runat="server" 
                        ControlToValidate="txtCedula" ErrorMessage="*Cedula - Campo obligatorio" ForeColor="Red" Display="None"></asp:RequiredFieldValidator>
                     &nbsp;  
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"  ControlToValidate="txtCedula" ValidationExpression="([Z0-9]{8,30})$" 
                        ErrorMessage="El campo debe contener 8 números"  ForeColor="Red"></asp:RegularExpressionValidator>

                </td>
            </tr>

                <tr>
                    <td style="text-align:right; width:45%;">
                    Casa
                    </td>
                    <td  style="text-align:left; width:55%">
                    <select id="cmbCasas" class="styled-select" style="width:300px" runat="server" onchange='ChooseCasa()' >
                            </select>
                    </td>
                </tr>

            <tr >
                <td style="text-align:right; width:45%">
                    &nbsp;
                    Dirección</td>
                <td style="text-align:left; width:55%">
                    &nbsp;      
                    <asp:TextBox ID="txtDir" runat="server" CssClass="myText" Enabled="false"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvDir" runat="server" 
                                ControlToValidate="txtDir" ErrorMessage="*Dirección - Campo obligatorio" ForeColor="Red" Display="None" Enabled="false"></asp:RequiredFieldValidator> </td>
            </tr>
            <tr >
                <td style="text-align:right; width:45%">
                    &nbsp;
                    Foto</td>
                <td style="text-align:left; width:55%">
                            <asp:FileUpload ID="flpFoto" runat="server" Enabled="false"/>
                            <asp:RequiredFieldValidator ID="rfvFoto" runat="server" Enabled="false"
                                ControlToValidate="flpFoto" ErrorMessage="*Foto - Campo obligatorio" ForeColor="Red" Display="None"></asp:RequiredFieldValidator> </td>
            </tr>
            <tr >
                <td style="text-align:right; width:45%">
                    &nbsp;
                    </td>
                <td style="text-align:left; width:55%">
                    <div >             <asp:Image ID="ImageCasa" runat="server" Height="250px"/>
                       &nbsp;</div>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
        </table>
        </asp:Panel>

        <script type="text/javascript">

        </script>

        <div style="width=100%; text-align:center;" >
            <asp:ValidationSummary ID="ValidationSummary1" runat="server"  />
        <div style="width=100%; text-align:center;" >
            <asp:Label ID="lblMensaje" runat="server" Text="" Font-Size="Larger" ForeColor="Red"></asp:Label>
        </div>
        <asp:Button ID="btnSiguiente" runat="server" Text="Aceptar"  
            CssClass="myButton" onclick="btnSiguiente_Click"/>  &nbsp;  &nbsp;
        <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" CssClass="myButton" 
            onclick="btnCancelar_Click" CausesValidation="False" />
        <asp:Button ID="btnAux1" runat="server" Text="" Width="0px" Height="0px" 
            onclick="btnAux1_Click" CssClass="esconderBtn" CausesValidation="False"  />
    </div>
    <script type="text/javascript">

        function ChooseCasa() {
            $('#<%=btnAux1.ClientID %>').click();
        }
    </script>
</asp:Content>
